﻿using System;
using PM.Repository;
using PM.IRepository;

namespace PM.Bussiness.System
{
    public class EntityBLL
    {
        private IEntity iDAL = new EntityDAL();
        public bool CreateEntity(string entityName, string contentRootPath)
        {
            string[] arr = contentRootPath.Split('/');
            string baseFileProvider = "";
            for (int i = 0; i < arr.Length - 1; i++)
            {
                baseFileProvider += arr[i];
                baseFileProvider += "/";
            }
            string filePath = baseFileProvider + "App.Entity";
            return iDAL.CreateEntity(entityName, filePath);
        }
    }
}
